package com.example.study.design.factory;

import lombok.Data;

/**
 * 客户端
 *
 * @author duckquan
 */
@Data
public class Client {

    private AbstractTV tv;

    private AbstractFreezer freezer;

    public Client(AppliancesFactory factory) {
        //在客户端看来就是使用抽象工厂来生产家电
        this.tv = factory.createTV();
        this.freezer = factory.createFreezer();
    }

}
